<?php

/**
 * docente form base class.
 *
 * @method docente getObject() Returns the current form's model object
 *
 * @package    sistema_itec_new
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BasedocenteForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'persona_id'                  => new sfWidgetFormInputHidden(),
      'etiqueta'                    => new sfWidgetFormInputText(),
      'etiqueta_titulo'             => new sfWidgetFormInputText(),
      'inicio_actividad_docente'    => new sfWidgetFormDate(),
      'fecha_ingreso'               => new sfWidgetFormDate(),
      'legajo_provincial'           => new sfWidgetFormInputText(),
      'cuil'                        => new sfWidgetFormInputText(),
      'experiencia_laboral'         => new sfWidgetFormInputText(),
      'experiencia_laboral_docente' => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'persona_id'                  => new sfValidatorChoice(array('choices' => array($this->getObject()->get('persona_id')), 'empty_value' => $this->getObject()->get('persona_id'), 'required' => false)),
      'etiqueta'                    => new sfValidatorString(array('max_length' => 10, 'required' => false)),
      'etiqueta_titulo'             => new sfValidatorString(array('max_length' => 10, 'required' => false)),
      'inicio_actividad_docente'    => new sfValidatorDate(),
      'fecha_ingreso'               => new sfValidatorDate(),
      'legajo_provincial'           => new sfValidatorString(array('max_length' => 15)),
      'cuil'                        => new sfValidatorString(array('max_length' => 15)),
      'experiencia_laboral'         => new sfValidatorInteger(),
      'experiencia_laboral_docente' => new sfValidatorInteger(),
    ));

    $this->widgetSchema->setNameFormat('docente[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'docente';
  }

}
